<?php
namespace App\Exports;

use App\Models\Task;
use App\Models\User;
use Illuminate\Contracts\View\View;
use Maatwebsite\Excel\Concerns\FromView;

class TaskExport implements FromView
{
    private $where;
    public function __construct($where)
    {
        $this->where = $where;
    }

    public function view(): View
    {
         
        $list = Task::where($this->where)->get();            
       
        return view('admin.task.export_index', [
            'list' => $list
        ]);
    }
}

?>